/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2021/5/22
 * Time: 0:20
 */

#ifndef CODSEEGMENT_CUSTOMSERIES_H
#define CODSEEGMENT_CUSTOMSERIES_H
#include <QtCharts>
QT_CHARTS_USE_NAMESPACE

class CustomSeries
    : public QBarSeries
{
    Q_OBJECT
public:
    CustomSeries(QObject * parent = nullptr);

    CustomSeries * OwnSeries(int index);

    void MapCustomSeries(int index, CustomSeries * customSeries);

    QStringList Categories();

    const QStringList & GetCategories() const;

    void SetCategories(const QStringList & categories);

    int GetMaxValue() const;

    void SetMaxValue(int maxValue);

private:
    QMap<int, CustomSeries *> custom_series_map_;
    QStringList               categories_;
    int                       max_value_;
};

#endif//CODSEEGMENT_CUSTOMSERIES_H
